#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+10;
const double PI = acos(-1.0);
struct Point{
    int x,y;
    double dis(Point p1) const{
        return sqrt(1.0*(p1.x - x)*(p1.x - x) + 1.0*(p1.y - y)*(p1.y - y));
    }
    double alpha() const{
        double vl = acos(x/dis({0,0}));
        if(y < 0){
            vl = 2*PI - vl;
        }
        return vl;
    }
};
Point points[N];
bool cmp(Point pa,Point pb){
    return pa.alpha() < pb.alpha();
}
struct cmp1{
    bool operator()(Point pa,Point pb){
        return 1ll*pa.x*pb.y - 1ll*pb.x*pa.y < 0;
    }
};
double trans(double v1){
    if(v1 < 1e-5){
        v1 += 2*PI;
    }
    return v1;
}
int main(){
    int n;
    cin>>n;
    for(int i = 1;i <= n;i++){
        cin>>points[i].x>>points[i].y;
    }
    sort(points + 1,points + 1 + n,cmp);
    priority_queue<Point,vector<Point>,cmp1> q1,q2;
    for(int i = 1;i<=n;i++){
        if(points[i].alpha() <= PI){
            q1.push(points[i]);
        }else{
            q2.push(points[i]);
        }
    }
    long long ans = 1ll*n * (n - 1)*(n - 2)/6;
    long long m1 = 0;
    for(int i = 1;i<=n;i++){
        Point cur = points[i];
        while(q2.size() && trans(q2.top().alpha() - cur.alpha()) <= PI){
            q1.push(q2.top());
            q2.pop();
        }
        assert(q1.size());
        q1.pop();
        long long res = 1ll*q1.size()*(q1.size() - 1)/2 + 1ll*q2.size()*(q2.size() - 1)/2;
        q2.push(cur);
        //cerr<<res<<'\n';
        m1 += res;
    }
    m1/=2;
    ans -= m1;
    cout<<ans<<'\n';
}